home *** CD-ROM | disk | FTP | other *** search
- set plainInt short # use long with MPW C
-
- set exit 0
- for f in {"parameters"}
- target "{f}"
- subword procedure void
- subword integer "short"
- subword longint "long"
- subword var ""
- subword function ""
- substitute '([a-zA-Z_0-9]+)®1[ ∂t∂n]*∂=[ ∂t∂n]*record' 'struct ®1 ¥START¥'
- substitute '^.' '->'
- substitute '([a-zA-Z_0-9]+)®1∂^' '*®1'
- substitute '∂:=' '¥ASSIGN¥'
- substitute '<>' '¥NOTEQUAL¥'
- substitute '>=' '¥GREATEREQUAL¥'
- substitute '<=' '¥LESSEQUAL¥'
- substitute '=' '¥EQUALS¥'
- substitute '¥EQUALS¥' '=='
- substitute '¥NOTEQUAL¥' '!='
- substitute '¥GREATEREQUAL¥' '>='
- substitute '¥LESSEQUAL¥' '<='
- substitute '¥ASSIGN¥' '='
- substitute '([a-zA-Z_0-9]+)®1[ ∂t∂n]*∂:[ ∂t∂n]*([a-zA-Z_0-9]+)®2' '®2 ®1'
- find •
- replace -c ∞ '/[¬a-zA-Z_0-9]if[ ∂t∂n]+(≈)®1[ ∂t∂n]+then/' 'if (®1)'
- find •
- replace -c ∞ '/[¬a-zA-Z_0-9]while[ ∂t∂n]+(≈)®1[ ∂t∂n]+{/' 'while (®1) ¥START¥'
- find •
- replace -c ∞ '/[¬a-zA-Z_0-9]case[ ∂t∂n]+(≈)®1[ ∂t∂n]+of/' 'switch (®1)'
- subword elseif "else if"
- subword begin '¥START¥'
- subword end '¥FINISH¥'
- #substitute '∂(∂*' '/*'
- #substitute '∂*∂)' '*/'
- substitute '{' '∂/∂*'
- substitute '}' '∂*∂/'
- substitute '¥START¥' '{'
- substitute '¥FINISH¥' '}'
- substitute '};' '}'
- #save "{target}"
- #close "{target}"
- end
- set exit 1
-